﻿<?xml version="1.0" encoding="utf-8" ?>

<lz:project xmlns:lz="http://schemas.icitadel.com/Lazarus/Source.xsd"
	name="Lazarus" namespace="OR.Lazarus.Library" owner="dbo" user="jmuharsky" businessconcept="CPP.Rules" namespaceprefix="lzr" namespaceuri="http://schemas.icitadel.com/Lazarus/CPP/Rules.xsd">
   <lz:description>Defines the structure of a Rulesheet for a Lazarus CPP Compilation.</lz:description>
   <lz:defaults>
      <lz:fields>
         <lz:field name="Id" alias="id" type="Varchar" size="100">
            <lz:indexes>
               <lz:index type="Primary" />
            </lz:indexes>
         </lz:field>
         <lz:field name="Description" alias="description" type="Text" />
      </lz:fields>
   </lz:defaults>
   <lz:objects>
      
      <lz:object name="Ruleset">
         <lz:description>Describes a set of rules for naming classes, fields and methods.</lz:description>
         <lz:collections>
            <lz:collection name="Includes" object="Include" />
            <lz:collection name="ClassRules" alias="class-rules" object="ClassRule" />
            <lz:collection name="VariableRules" alias="variable-rules" object="VariableRule" />
            <lz:collection name="MethodRules" alias="method-rules" object="MethodRule" />
         </lz:collections>
      </lz:object>

      <lz:object name="Include">
         <lz:description>Defines a set of files that should always be included in the results.</lz:description>
         <lz:fields>
            <lz:field name="File" type="Varchar" size="255" />
         </lz:fields>
      </lz:object>

      <lz:object name="ClassRule" alias="class-rule">
         <lz:description>Defines a rule to be applied at the class scope.  This can be used for table persistence and filenames, for example.</lz:description>
         <lz:fields>
            <lz:field name="Context" type="Varchar" size="255" required="true" />
            <lz:field name="UseEntityName" alias="use-entity-name" type="Bit" required="true" default="false" />
            <lz:field name="Format" type="Varchar" size="255" required="true" default="Default" />
            <lz:field name="Prefix" type="Varchar" size="50" />
            <lz:field name="Suffix" type="Varchar" size="50" />
         </lz:fields>
      </lz:object>

      <lz:object name="VariableRule" alias="variable-rule">
         <lz:description>Defines a rule to be applied to variables.  This includes field storage as well as parameters and local declaration rules.</lz:description>
         <lz:fields>
            <lz:field name="Context" type="Varchar" size="255" required="true" />
            <lz:field name="UseNotation" alias="use-notation" type="Bit" required="true" default="false" />
            <lz:field name="Format" type="Varchar" size="255" required="true" default="Default" />
            <lz:field name="Prefix" type="Varchar" size="50" />
            <lz:field name="Suffix" type="Varchar" size="50" />
            <lz:field name="Scope" type="Varchar" size="50" />
         </lz:fields>
      </lz:object>

      <lz:object name="MethodRule" alias="method-rule">
         <lz:description>Defines a rule to be applied to methods.  This includes property and event handlers.</lz:description>
         <lz:fields>
            <lz:field name="Context" type="Varchar" size="255" required="true" />
            <lz:field name="Prefix" type="Varchar" size="50" />
            <lz:field name="Suffix" type="Varchar" size="50" />
            <lz:field name="Scope" type="Varchar" size="50" />
         </lz:fields>
         <lz:collections>
            <lz:collection name="Filters" alias="filtered-rules" object="FilteredRule" />
         </lz:collections>
      </lz:object>

      <lz:object name="FilteredRule" alias="filtered-rule">
         <lz:description>Defines a rule to be applied selectively to a context.  This may be used to provide different prefix/suffix rules to different datatypes (such as "Is" for boolean accessors).</lz:description>
         <lz:fields>
            <lz:field name="Type" type="Varchar" size="255" />
            <lz:field name="Prefix" type="Varchar" size="50" />
            <lz:field name="Suffix" type="Varchar" size="50" />
            <lz:field name="Scope" type="Varchar" size="50" />
         </lz:fields>
      </lz:object>
      
   </lz:objects>
</lz:project>